Skip to content

improve: week calendar UX and throughput dashboard cards#189

Merged
coji merged 9 commits intomainfrom
improve/weekly-calendar-and-throughput-cards
Mar 16, 2026
Merged

improve: week calendar UX and throughput dashboard cards#189
coji merged 9 commits intomainfrom
improve/weekly-calendar-and-throughput-cards

Conversation

@coji
Copy link
Owner

@coji coji commented Mar 16, 2026

Summary

WeeklyCalendar

  • Today ボタンをカレンダーポップアップ内の「今週に戻る」に移動(レイアウトシフト解消)
  • 週ラベルを常に M/D – M/D 形式に統一(年またぎでも幅安定)
  • prev/next ボタンを ghost variant に変更(ボーダーノイズ軽減)

Throughput Merged/Deployed

  • Objective の grid 表示を Big Number カード3枚に変更(件数・中央値・Achievement)
  • 前週比の差分バッジを追加(緑=改善、赤=悪化)
  • カレンダーと Options を AppDataTable のツールバー行にまとめてレイアウト改善
  • クリップボードコピーボタンを削除

Throughput Ongoing

  • テーブルタイトルを Big Number カード2枚に変更(件数・Median Age)
  • クリップボードコピーボタンを削除

AppDataTable

  • children スロットを追加(ツールバーとテーブル間にコンテンツ挿入可能に)
  • Options ボタンを ghost variant に変更

Test plan

  • typecheck 通過
  • Merged/Deployed: カード表示と前週比が正しいことを確認
  • Ongoing: カード表示が正しいことを確認
  • WeeklyCalendar: 週移動でレイアウトシフトがないことを確認
  • モバイル表示で崩れないことを確認

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Period-over-period KPI cards with visual diff indicators (Deployed/Merged/Ongoing) and median metric displays
    • AppDataTable accepts and renders custom children between toolbar and table
  • Improvements

    • Weekly calendar: simplified labels and a full-width "return to current week" control; button styling updated to ghost
    • Compact card-style metric presentation
  • Removed

    • Markdown copy/export functionality

coji and others added 7 commits March 16, 2026 14:13
WeeklyCalendar:
- Today ボタンをカレンダーポップアップ内の「今週に戻る」に移動
- 週ラベルを常に M/D – M/D 形式に統一(年またぎでも幅安定)
- カレンダーのボーダー二重表示を修正

Throughput Merged/Deployed:
- Objective の grid 表示を Big Number カード3枚に変更
- 中央値(Median Time to Merge/Deploy)を追加
- テーブルタイトルの冗長な日付・件数表示を削除

Throughput Ongoing:
- テーブルタイトルを Big Number カード2枚に変更(件数 + Median Age)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AppDataTable に children スロットを追加し、ツールバーとテーブルの間に
コンテンツを差し込めるようにした。

Merged/Deployed: カレンダーを AppDataTable の title に、
カードを children に配置し、カレンダーと Options が同じ行に収まるように。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
カレンダーの prev/next ボタンと Options ボタンを ghost に変更し
ボーダーのノイズを軽減。日付表示ボタンのみ outline を維持。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
前週のデータを並列取得し、各カードに前週比を表示。
件数・Achievement の増加は緑、Median Time の短縮も緑(invertColor)。
差分ゼロや前週データなしの場合は非表示。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

Warning

Rate limit exceeded

@coji has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 16 minutes and 8 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d97461b6-f92c-40ba-8eca-0f3f41a03625

📥 Commits

Reviewing files that changed from the base of the PR and between b27f90d and 6c4b3ed.

📒 Files selected for processing (11)
  • app/libs/stats.ts
  • app/routes/$orgSlug/analysis/reviews/+functions/aggregate.ts
  • app/routes/$orgSlug/throughput/+components/diff-badge.tsx
  • app/routes/$orgSlug/throughput/+components/stat-card.tsx
  • app/routes/$orgSlug/throughput/+functions/calc-stats.ts
  • app/routes/$orgSlug/throughput/deployed/+functions/generate-markdown.ts
  • app/routes/$orgSlug/throughput/deployed/index.tsx
  • app/routes/$orgSlug/throughput/merged/+functions/generate-markdown.ts
  • app/routes/$orgSlug/throughput/merged/index.tsx
  • app/routes/$orgSlug/throughput/ongoing/+functions/generate-markdown.ts
  • app/routes/$orgSlug/throughput/ongoing/index.tsx
📝 Walkthrough

Walkthrough

Adds child rendering to AppDataTable, swaps several button variants to "ghost", simplifies the week-calendar UI/labels, adds median and calcStats utilities, introduces DiffBadge and StatCard, refactors throughput loaders to fetch previous-period data in parallel and surface current vs previous stats, and removes several generateMarkdown utilities.

Changes

Cohort / File(s) Summary
Core Components
app/components/AppDataTable.tsx, app/components/AppDataTableViewOption.tsx, app/components/week-calendar.tsx
AppDataTable now accepts and renders children between the toolbar and table body; AppDataTableViewOptions Button variant changed to ghost; week-calendar simplified (label formatting, layout, and navigation) and adds a full-width "今週に戻る" ghost button when viewing a non-current week.
Throughput Routes — Deployed / Merged / Ongoing
app/routes/$orgSlug/throughput/deployed/index.tsx, app/routes/$orgSlug/throughput/merged/index.tsx, app/routes/$orgSlug/throughput/ongoing/index.tsx
Loaders now fetch current and previous period PRs in parallel and use calcStats to derive count, median, and achievementRate; UI replaced copy-to-markdown actions with a 3-card (or 2-card for ongoing) StatCard summary and DiffBadge comparisons; WeeklyCalendar used in titles; loaderData shape updated to include prev and derived stats.
New UI Primitives
app/routes/$orgSlug/throughput/+components/diff-badge.tsx, app/routes/$orgSlug/throughput/+components/stat-card.tsx
Added DiffBadge (renders signed, colored diff vs previous) and StatCard (presentational KPI card) components.
Stats Utilities
app/routes/$orgSlug/throughput/+functions/calc-stats.ts, app/libs/stats.ts
Added median utility in app/libs/stats.ts and calcStats helper returning { count, median, achievementRate } for a PR list.
Removed Markdown Export Helpers
app/routes/$orgSlug/throughput/deployed/+functions/generate-markdown.ts, app/routes/$orgSlug/throughput/merged/+functions/generate-markdown.ts, app/routes/$orgSlug/throughput/ongoing/+functions/generate-markdown.ts
Removed generateMarkdown utilities across throughput routes and deleted associated imports/usages.
Other refactors
app/routes/$orgSlug/analysis/reviews/+functions/aggregate.ts
Replaced local median implementation with import from shared app/libs/stats.ts.

Sequence Diagram

sequenceDiagram
    participant Loader as Route Loader
    participant DB as Data Source
    participant calcStats as calcStats Helper
    participant UI as Rendered Page

    Loader->>DB: Fetch current period PRs (Promise.all)
    Loader->>DB: Fetch previous period PRs (parallel)
    DB-->>Loader: current PRs
    DB-->>Loader: previous PRs

    Loader->>calcStats: calcStats(current PRs)
    activate calcStats
    calcStats-->>Loader: { count, median, achievementRate }
    deactivate calcStats

    Loader->>calcStats: calcStats(previous PRs)
    activate calcStats
    calcStats-->>Loader: prev { count, median, achievementRate }
    deactivate calcStats

    Loader->>UI: Return loaderData (current + prev + teams + params)
    UI->>UI: Render StatCard(s)
    UI->>UI: Render DiffBadge(current vs prev)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰
I hopped through loaders, stats in paw,
Comparing weeks with joyful awe,
Badges gleam where numbers play,
Tables now hold extra clay,
Back to this week — a single hop, hurrah! 🎋

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'improve: week calendar UX and throughput dashboard cards' accurately summarizes the main changes: WeeklyCalendar component refinements and throughput dashboard UI updates with card-based metrics display.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improve/weekly-calendar-and-throughput-cards
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coji and others added 2 commits March 16, 2026 14:40
- DiffBadge → throughput/+components/diff-badge.tsx (cn() 使用に修正)
- StatCard → throughput/+components/stat-card.tsx
- calcStats → throughput/+functions/calc-stats.ts (アクセサ引数で共通化)
- median() → app/libs/stats.ts (4箇所の重複を解消、aggregate.ts も統一)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
コピーボタン削除でどこからも参照されなくなった。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coji coji merged commit 77d8d7b into main Mar 16, 2026
6 checks passed
@coji coji deleted the improve/weekly-calendar-and-throughput-cards branch March 16, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant